#ifndef REPORT_BUILDER_H
#define REPORT_BUILDER_H

#include "../documents/swpreportdocument.h"
#include "../documents/swpsimulationcasedocument.h"

#include <coretypes.h>
#include <nettypes.h>

namespace swp
{
class ReportData;
class SwpSimActivityGraphicItem;

class ReportBuilder
{
public:
    static ReportBuilder* getInstance();
    static void destroy();

    QSharedPointer<SwpReportDocument> build(
        const QSharedPointer<SwpSimulationCaseDocument>& document);

private:
    ReportBuilder();
    ~ReportBuilder();
    void makeExecEntry(uint run,
        const SwpSimActivityGraphicItem* item, int execs, ReportData* data);
    void makeTokenEntry(uint run, const net::nid& id,
        const core::TypeValue& tokens, bool isEndPlace, ReportData* data);
};

} // namespace swp

#endif
